

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/Teimlz/teimlz.github.io@master/image/page/favicon.jpg">
  <link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/Teimlz/teimlz.github.io@master/image/page/favicon.jpg">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="这是我的小笔记本,主要要用记录学习过程,当然也会记录一些随心笔记.">
  <meta name="author" content="筏执">
  <meta name="keywords" content="">
  <title>page.title - 筏执的小笔记本</title>

  <link  rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.5.3/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.staticfile.org/github-markdown-css/4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/10.1.2/styles/github-gist.min.css" />
    
  

  



<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.8.5","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":""},"copy_btn":true,"image_zoom":{"enable":true},"lazyload":{"enable":true,"onlypost":false},"web_analytics":{"enable":true,"baidu":"6c1436d3df29ec7c0cda293342e60e93","google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":1279445150,"leancloud":{"app_id":null,"app_key":null,"server_url":null}}};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.2.0"></head>


<body>
  <header style="height: 60vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>筏执的笔记本</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/links/">
                <i class="iconfont icon-link-fill"></i>
                网站
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" href="javascript:">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner intro-2" id="background" parallax=true
         style="background: url('https://cdn.jsdelivr.net/gh/Teimlz/teimlz.github.io@master/image/page/HomePage.jpg') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="page.title">
              
            </span>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      <div class="container nopadding-md">
        <div class="py-5" id="board"
          >
          
          <div class="container">
            <div class="row">
              <div class="col-12 col-md-10 m-auto">
                

<div class="page-content">
  <h1 id="注解-Annotation"><a href="#注解-Annotation" class="headerlink" title="注解(Annotation)"></a>注解(Annotation)</h1><blockquote>
<p>什么是注解</p>
</blockquote>
<p>&#8195;&#8195;Annotation(注解)是JDK1.5及以后版本引入的。其是一种代码级别的说明，与类、接口、枚举是在同一个层次。可以声明在包、类、字段、方法、局部变量、方法参数等的前面，用来对这些元素进行说明，注释。</p>
<p>&#8195;&#8195;作用分类：</p>
<ol>
<li>编写文档：通过代码里标识的元数据生成文档【生成文档doc文档】</li>
<li>代码分析：通过代码里标识的元数据对代码进行分析【使用反射】</li>
<li>编译检查：通过代码里标识的元数据让编译器能够实现基本的编译检查【Override】</li>
</ol>
<blockquote>
<p>基本内置注解</p>
</blockquote>
<p>&#8195;&#8195;基本内置注解是JDK内置的一些注解。</p>
<ol>
<li><p>@Override</p>
<p>说明对覆盖超类中的方法进行标记。 也就是重写方法注解。</p>
<pre><code class="hljs java"><span class="hljs-meta">@Target(ElementType.METHOD)</span>
<span class="hljs-meta">@Retention(RetentionPolicy.SOURCE)</span>
<span class="hljs-keyword">public</span> <span class="hljs-meta">@interface</span> Override &#123;
&#125;</code></pre>
</li>
<li><p>@Deprecated</p>
<p>对不应该再使用的类型添加注解。也就是不推荐使用注解。</p>
<pre><code class="hljs java"><span class="hljs-meta">@Documented</span>
<span class="hljs-meta">@Retention(RetentionPolicy.RUNTIME)</span>
<span class="hljs-meta">@Target(ElementType.ANNOTATION_TYPE)</span>
<span class="hljs-keyword">public</span> <span class="hljs-meta">@interface</span> Documented &#123;
&#125;</code></pre>
</li>
<li><p>@SuppressWarnings</p>
<p>忽略警告信息。</p>
<p>其参数有：</p>
<ol>
<li><p>deprecation，使用了过时的类或方法时的警告</p>
<pre><code>2. unchecked，执行了未检查的转换时的警告
3. fallthrough，当 switch 程序块直接通往下一种情况而没有 break 时的警告
4. path，在类路径、源文件路径等中有不存在的路径时的警告
5. serial，当在可序列化的类上缺少serialVersionUID 定义时的警告
6. finally ，任何 finally 子句不能正常完成时的警告
7. all，关于以上所有情况的警告</code></pre>
</li>
</ol>
<pre><code class="hljs java"><span class="hljs-meta">@Target(&#123;TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE&#125;)</span>
<span class="hljs-meta">@Retention(RetentionPolicy.SOURCE)</span>
<span class="hljs-keyword">public</span> <span class="hljs-meta">@interface</span> SuppressWarnings &#123;
    String[] value();
&#125;</code></pre>
</li>
<li><p>@SafeVarargs</p>
<p>JDK1.7新添基本注解。当使用可变数量的参数的时候，而参数的类型又是泛型T的话，就会出现警告。 这个时候，就使用@SafeVarargs来去掉这个警告。</p>
<p>@SafeVarargs注解只能用在参数长度可变的方法或构造方法上，且方法必须声明为static或final，否则会出现编译错误。一个方法使用@SafeVarargs注解的前提是，开发人员必须确保这个方法的实现中对泛型类型参数的处理不会引发类型安全问题。</p>
<pre><code class="hljs java"><span class="hljs-meta">@Documented</span>
<span class="hljs-meta">@Retention(RetentionPolicy.RUNTIME)</span>
<span class="hljs-meta">@Target(&#123;ElementType.CONSTRUCTOR, ElementType.METHOD&#125;)</span>
<span class="hljs-keyword">public</span> <span class="hljs-meta">@interface</span> SafeVarargs &#123;&#125;</code></pre>



</li>
</ol>
<ol start="5">
<li><p>@FunctionalInterface</p>
<p>JDK1.8新添基本注解。用于约定函数式接口。</p>
<p>函数式接口概念： 如果接口中只有一个抽象方法（可以包含多个默认方法或多个static方法），该接口称为函数式接口。函数式接口其存在的意义，主要是配合Lambda 表达式 来使用。</p>
<pre><code class="hljs java"><span class="hljs-meta">@Documented</span>
<span class="hljs-meta">@Retention(RetentionPolicy.RUNTIME)</span>
<span class="hljs-meta">@Target(ElementType.TYPE)</span>
<span class="hljs-keyword">public</span> <span class="hljs-meta">@interface</span> FunctionalInterface &#123;&#125;</code></pre>



</li>
</ol>
<blockquote>
<p>元注解</p>
</blockquote>
<p>&#8195;&#8195;元注解是注解的注解。其主要是为注解提供一些信息的注解。主要有4种元注解。</p>
<ol>
<li><p>@Documented</p>
<p>为注解提供Javadoc支持。也就是在使用javadoc命令生成API文档后，可以在文档中看到注解说明。</p>
<pre><code class="hljs java"><span class="hljs-meta">@Documented</span>
<span class="hljs-meta">@Retention(RetentionPolicy.RUNTIME)</span>
<span class="hljs-meta">@Target(ElementType.ANNOTATION_TYPE)</span>
<span class="hljs-keyword">public</span> <span class="hljs-meta">@interface</span> Documented &#123;&#125;</code></pre>
</li>
<li><p>@Target</p>
<p>该注解用于表示 注解能够放在什么的位置上。用于声明注解范围。其值是一个枚举类型ElementType数组。</p>
<p>如果没有该注解，则注解可以用于任何地方。</p>
<pre><code class="hljs Java"><span class="hljs-comment">//注意：以下中文不是翻译！以下中文不是翻译！以下中文不是翻译！</span>
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">enum</span> <span class="hljs-title">ElementType</span> </span>&#123;
    <span class="hljs-comment">/** Class, interface (including annotation type), or enum declaration */</span>
    <span class="hljs-comment">/** 作用与类，接口(包括注解类型),或者枚举 声明 */</span>
    TYPE,

    <span class="hljs-comment">/** Field declaration (includes enum constants) */</span>
    <span class="hljs-comment">/** 作用与字段(类的成员变量等)，包枚举常量 */</span>
    FIELD,

    <span class="hljs-comment">/** Method declaration */</span>
    <span class="hljs-comment">/** 作用与方法 */</span>
    METHOD,

    <span class="hljs-comment">/** Formal parameter declaration */</span>
    <span class="hljs-comment">/* 作用与方法参数 */</span>
    PARAMETER,

    <span class="hljs-comment">/** Constructor declaration */</span>
    <span class="hljs-comment">/** 作用与构造器 */</span>
    CONSTRUCTOR,

    <span class="hljs-comment">/** Local variable declaration */</span>
    <span class="hljs-comment">/* 作用与局部变量 */</span>
    LOCAL_VARIABLE,

    <span class="hljs-comment">/** Annotation type declaration */</span>
    <span class="hljs-comment">/** 作用与注解 */</span>
    ANNOTATION_TYPE,

    <span class="hljs-comment">/** Package declaration */</span>
    <span class="hljs-comment">/** 作用与包 */</span>
    PACKAGE,

    <span class="hljs-comment">/**</span>
<span class="hljs-comment">     * Type parameter declaration</span>
<span class="hljs-comment">     *</span>
<span class="hljs-comment">     * <span class="hljs-doctag">@since</span> 1.8</span>
<span class="hljs-comment">     */</span>
    <span class="hljs-comment">/**</span>
<span class="hljs-comment">     * 类型参数声明 : 作用于类型泛型，即泛型方法、泛型类、泛型接口</span>
<span class="hljs-comment">     *</span>
<span class="hljs-comment">     * 作用在1.8及其以上</span>
<span class="hljs-comment">     */</span>
    TYPE_PARAMETER,

    <span class="hljs-comment">/**</span>
<span class="hljs-comment">     * Use of a type</span>
<span class="hljs-comment">     *</span>
<span class="hljs-comment">     * <span class="hljs-doctag">@since</span> 1.8</span>
<span class="hljs-comment">     */</span>
     <span class="hljs-comment">/**</span>
<span class="hljs-comment">     * 使用一个类型 : 可以用于标注任意类型除了 class</span>
<span class="hljs-comment">     *</span>
<span class="hljs-comment">     * 作用在1.8及其以上</span>
<span class="hljs-comment">     */</span>
    TYPE_USE
&#125;</code></pre>

<p>例如@Override中，@Target注解中的值就是ElementType.METHOD，也就是只能用于方法上面。</p>
<pre><code class="hljs java"><span class="hljs-meta">@Documented</span>
<span class="hljs-meta">@Retention(RetentionPolicy.RUNTIME)</span>
<span class="hljs-meta">@Target(ElementType.ANNOTATION_TYPE)</span>
<span class="hljs-keyword">public</span> <span class="hljs-meta">@interface</span> Target &#123;
    ElementType[] value();
&#125;</code></pre>
</li>
<li><p>@Retention</p>
<p>注解的保留位置。也可以说是注解的生命周期。其值是一个枚举RetentionPolicy。</p>
<p>如果没有该注解，则默认保留在Class中</p>
<pre><code class="hljs Java"><span class="hljs-comment">//注意：以下中文不是翻译！以下中文不是翻译！以下中文不是翻译！</span>
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">enum</span> <span class="hljs-title">RetentionPolicy</span> </span>&#123;
    <span class="hljs-comment">/**</span>
<span class="hljs-comment">     * Annotations are to be discarded by the compiler.</span>
<span class="hljs-comment">     */</span>
    <span class="hljs-comment">//注解仅保留在源码中，在Class字节码文件中不会包含</span>
    SOURCE,

    <span class="hljs-comment">/**</span>
<span class="hljs-comment">     * Annotations are to be recorded in the class file by the compiler</span>
<span class="hljs-comment">     * but need not be retained by the VM at run time.  This is the default</span>
<span class="hljs-comment">     * behavior.</span>
<span class="hljs-comment">     */</span>
    <span class="hljs-comment">//Retention默认值，注解在Class文件中存在，但是在运行时无法获取。</span>
    CLASS,

    <span class="hljs-comment">/**</span>
<span class="hljs-comment">     * Annotations are to be recorded in the class file by the compiler and</span>
<span class="hljs-comment">     * retained by the VM at run time, so they may be read reflectively.</span>
<span class="hljs-comment">     *</span>
<span class="hljs-comment">     * <span class="hljs-doctag">@see</span> java.lang.reflect.AnnotatedElement</span>
<span class="hljs-comment">     */</span>
    <span class="hljs-comment">//注解在运行期也存在。可以通过反射进行获取。</span>
    RUNTIME
&#125;</code></pre>

<p>@Retention注解就是用于约束注解的生命周期，一般自定义注解都是选择RetentionPolicy.RUNTIME。而且</p>
<p>RUNTIME &gt; CLASS &gt; SOURCE;如果是运行期存在，那么Class中也必然存在。</p>
<pre><code class="hljs java"><span class="hljs-meta">@Documented</span>
<span class="hljs-meta">@Retention(RetentionPolicy.RUNTIME)</span>
<span class="hljs-meta">@Target(ElementType.ANNOTATION_TYPE)</span>
<span class="hljs-keyword">public</span> <span class="hljs-meta">@interface</span> Retention &#123;
    <span class="hljs-function">RetentionPolicy <span class="hljs-title">value</span><span class="hljs-params">()</span></span>;
&#125;</code></pre>
</li>
<li><p>@Inherited</p>
<p>声明子类可以继承该注解。假如A类使用了该注解，那么A类的子类也会继承此注解。</p>
<pre><code class="hljs java"><span class="hljs-meta">@Documented</span>
<span class="hljs-meta">@Retention(RetentionPolicy.RUNTIME)</span>
<span class="hljs-meta">@Target(ElementType.ANNOTATION_TYPE)</span>
<span class="hljs-keyword">public</span> <span class="hljs-meta">@interface</span> Inherited &#123;
&#125;</code></pre>
</li>
<li><p>@Repeatable</p>
<p>JDK1.8新添注解。用于声明标记的注解可以多次应用于相同的声明或类型。也就是注解可以同时作用一个对象多次，但是每次作用注解又代表这不同的意义。</p>
<p>其值是一个class。</p>
<pre><code class="hljs Java"><span class="hljs-meta">@Documented</span>
<span class="hljs-meta">@Retention(RetentionPolicy.RUNTIME)</span>
<span class="hljs-meta">@Target(ElementType.ANNOTATION_TYPE)</span>
<span class="hljs-keyword">public</span> <span class="hljs-meta">@interface</span> Repeatable &#123;
    <span class="hljs-comment">/**</span>
<span class="hljs-comment">     * Indicates the &lt;em&gt;containing annotation type&lt;/em&gt; for the</span>
<span class="hljs-comment">     * repeatable annotation type.</span>
<span class="hljs-comment">     * <span class="hljs-doctag">@return</span> the containing annotation type</span>
<span class="hljs-comment">     */</span>
    Class&lt;? extends Annotation&gt; value();
&#125;</code></pre>

</li>
</ol>
<blockquote>
<p>自定义注解</p>
</blockquote>
<ol>
<li><p>声明一个注解</p>
<pre><code class="hljs Java"><span class="hljs-meta">@interface</span> 注解名&#123;
	<span class="hljs-comment">//default 默认值 可以选择不用。 也就是 属性类型 属性名();</span>
	<span class="hljs-comment">//属性 可以 看作是成员变量。</span>
	属性类型 属性名() <span class="hljs-keyword">default</span> 默认值;
&#125;</code></pre>

<p>例如：</p>
<pre><code class="hljs Java"><span class="hljs-comment">/**</span>
<span class="hljs-comment"> * 数据库映射表 注解</span>
<span class="hljs-comment"> */</span>
<span class="hljs-meta">@Documented</span>
<span class="hljs-meta">@Target(ElementType.TYPE)</span>
<span class="hljs-meta">@Retention(RetentionPolicy.RUNTIME)</span>
<span class="hljs-keyword">public</span> <span class="hljs-meta">@interface</span> Table &#123;
    <span class="hljs-comment">/**</span>
<span class="hljs-comment">     * 表名</span>
<span class="hljs-comment">     */</span>
    <span class="hljs-function">String <span class="hljs-title">value</span><span class="hljs-params">()</span></span>;
&#125;</code></pre>



</li>
</ol>
<ol start="2">
<li><p>属性类型</p>
<ol>
<li>基本数据类型(int,double,float,char,short,long,boolean,byte)</li>
<li>String类型</li>
<li>枚举类型</li>
<li>注解类型</li>
<li>Class类型</li>
<li>以上类型的一维数组类型</li>
</ol>
</li>
<li><p>注解的本质</p>
<pre><code class="hljs java">
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">interface</span> <span class="hljs-title">Annotation</span> </span>&#123;

    <span class="hljs-function"><span class="hljs-keyword">boolean</span> <span class="hljs-title">equals</span><span class="hljs-params">(Object obj)</span></span>;

    <span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">hashCode</span><span class="hljs-params">()</span></span>;

    <span class="hljs-function">String <span class="hljs-title">toString</span><span class="hljs-params">()</span></span>;

    Class&lt;? extends Annotation&gt; annotationType();
&#125;</code></pre>

<p>注解的本质是一个接口，注解本身就是Annotation的一个子接口，在注解中，我们定义的方法其实就相当于注解的属性(因为接口的属性都是static final的，无法改变，所以使用了方法来代替属性。)，所以，在注解中的成员变量会有括号。不过不同与接口的是，我们可以给注解中的括号进行赋值。</p>
</li>
</ol>
<blockquote>
<p>注解的使用方法</p>
</blockquote>
<p>&#8195;&#8195;根据@Target注解中的注解范围来决定注解在那行地方进行使用。</p>
<pre><code class="hljs gcode">@注解名<span class="hljs-comment">(属性名 = 属性值,...)</span>
类，接口，方法....<span class="hljs-comment">(注意，该部分是由@Target指定的作用范围)</span></code></pre>



<p>例如我们使用 自定义注解 1.声明一个注解 的例子注解 来对一个用户类进行注解。</p>
<pre><code class="hljs Java"><span class="hljs-meta">@Table(&quot;db_user&quot;)</span>
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">User</span> </span>&#123;
    <span class="hljs-comment">/** ....... **/</span>
&#125;</code></pre>

<p>&#8195;&#8195;<strong>注意： 当属性名为value时，可以忽略属性名。</strong>但是如果属性名不是value或者没有默认值的话，那就必须显式使用。</p>
<blockquote>
<p>什么是反射</p>
</blockquote>
<p>&#8195;&#8195;反射是在运行状态中，对于<strong>任意</strong>一个类，都能够知道这个类的所有属性和方法;对于任意一个对象，都能够调用它的任意一个方法和属性。</p>
<blockquote>
<p>Class类</p>
</blockquote>
<p>&#8195;&#8195;反射机制的基础。任意一个类在初始化时，都会生成一个Class类型的唯一实例，该实例保存着对应类的所有信息。</p>
<blockquote>
<p>反射的使用方法</p>
</blockquote>
<p>&emsp;&emsp;反射需要基于Class类,通过Class获取类信息,再通过java.lang.reflect包下的反射类等等进行反射,实现类的实例化,修改类的字段,调用类的方法等等一系列高端操作.下面就是一个极其普通的例子.</p>
<blockquote>
<p>反射的简单性能对比</p>
</blockquote>
<blockquote>
<p>注解+反射</p>
</blockquote>
<blockquote>
<p>什么是动态代理</p>
</blockquote>
<blockquote>
<p>JDK实现动态代理</p>
</blockquote>
<blockquote>
<p>注解+动态代理</p>
</blockquote>
<blockquote>
<p>总结</p>
</blockquote>

</div>

              </div>
            </div>
          </div>
        </div>
      </div>
    

    
      <a id="scroll-top-button" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
  </div>
  

  

  
    <!-- cnzz Analytics Icon -->
    <span id="cnzz_stat_icon_1279445150" style="display: none"></span>
  
</footer>

<!-- SCRIPTS -->

  <script  src="https://cdn.staticfile.org/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.staticfile.org/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":200})
    NProgress.start()
    document.addEventListener('DOMContentLoaded', function() {
      window.NProgress && window.NProgress.inc();
    })
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js" ></script>
<script  src="https://cdn.staticfile.org/twitter-bootstrap/4.5.3/js/bootstrap.min.js" ></script>
<script  src="/js/debouncer.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  
    <script  src="/js/lazyload.js" ></script>
  



  







  <script  src="https://cdn.staticfile.org/anchor-js/4.3.0/anchor.min.js" ></script>



  <script defer src="https://cdn.staticfile.org/clipboard.js/2.0.6/clipboard.min.js" ></script>





  <script  src="https://cdn.staticfile.org/typed.js/2.0.11/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
      typing(title)
      
    })(window, document);
  </script>



  <script  src="/js/local-search.js" ></script>
  <script>
    (function () {
      var path = "/local-search.xml";
      var inputArea = document.querySelector("#local-search-input");
      inputArea.onclick = function () {
        searchFunc(path, 'local-search-input', 'local-search-result');
        this.onclick = null
      }
    })()
  </script>












  
    <!-- Baidu Analytics -->
    <script defer>
      var _hmt = _hmt || [];
      (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?6c1436d3df29ec7c0cda293342e60e93";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
  

  

  

  

  

  
    <!-- cnzz Analytics -->
    <script defer src="//s4.cnzz.com/z_stat.php?id=1279445150&show=pic"
            type="text/javascript"></script>
  





<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>



</body>
</html>
